/**
    var student = [98,78,67,88]
    var student = [ {number:1001,name:'jack',score:98}  ]  
  
 */
// var students = [
//     {number:1001, name:'jack', score:98,gender:'男'},
//     {number:1002, name:'rose', score:95,gender:'女'},
//     {number:1003, name:'小丽', score:85,gender:'女'},
// ]

var student = [
	{ number: 1001, name: 'jack', score: 98 },
	{ number: 1002, name: 'rose', score: 88 },
	{ number: 1003, name: '小丽', score: 85 },
]

student.forEach(function(item,index){
    console.log(item.score);
})


// var s = 0
// for (var i = 0; i < student.length; i++) {
//     var stu = student[i]
//     s = s + stu.score
// }
// console.log('总分 ',s, ' 平均分 ',s/student.length);
// var avg = parseInt(s/student.length)
// console.log('avg ',avg);

// for(var i = 0 ;i < student.length; i++){
//     var stu = student[i]
    
//     if(stu.score > avg){
//         console.log(stu);
//     }
// }


